from pydantic import BaseModel, ConfigDict
from datetime import datetime

# 用户创建请求体
class UserCreate(BaseModel):
    username: str
    email: str

# 用户响应体
class UserResponse(BaseModel):
    id: int
    username: str
    email: str
    created_at: datetime
    is_active: bool
    
    model_config = ConfigDict(from_attributes=True)